<?php

use Drupal\commerce_weight_shipping\Entity\CommerceWeightShipping;
use Drupal\commerce_weight_shipping\Entity\CommerceWeightShippingItem;
use Drupal\store\Entity\Store;

function commerce_weight_shipping_commerce_weight_shipping_add_page() {
  $e = new CommerceWeightShipping();
  module_load_include('inc', 'commerce_weight_shipping', 'commerce_weight_shipping.forms');
  return drupal_get_form('commerce_weight_shipping_commerce_weight_shipping_entity_form', $e, 'add');
}

function commerce_weight_shipping_commerce_weight_shipping_view_page(CommerceWeightShipping $e) {
  return entity_view($e->entityType(), [$e]);
}

function commerce_weight_shipping_commerce_weight_shipping_edit_page(CommerceWeightShipping $e) {
  module_load_include('inc', 'commerce_weight_shipping', 'commerce_weight_shipping.forms');
  return drupal_get_form('commerce_weight_shipping_commerce_weight_shipping_entity_form', $e, 'edit');
}

function commerce_weight_shipping_commerce_weight_shipping_delete_page(CommerceWeightShipping $e) {
  module_load_include('inc', 'commerce_weight_shipping', 'commerce_weight_shipping.forms');
  return drupal_get_form('commerce_weight_shipping_commerce_weight_shipping_delete_form', $e);
}
